/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class TiendaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idTienda;
	public final StringExpression nombreTienda;
	public final StringExpression direccionCentral;
	public final IntegerExpression rol;
	public final IntegerExpression RUT;
	
	public TiendaDetachedCriteria() {
		super(orm.Tienda.class, orm.TiendaCriteria.class);
		idTienda = new IntegerExpression("idTienda", this.getDetachedCriteria());
		nombreTienda = new StringExpression("nombreTienda", this.getDetachedCriteria());
		direccionCentral = new StringExpression("direccionCentral", this.getDetachedCriteria());
		rol = new IntegerExpression("rol", this.getDetachedCriteria());
		RUT = new IntegerExpression("RUT", this.getDetachedCriteria());
	}
	
	public TiendaDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.TiendaCriteria.class);
		idTienda = new IntegerExpression("idTienda", this.getDetachedCriteria());
		nombreTienda = new StringExpression("nombreTienda", this.getDetachedCriteria());
		direccionCentral = new StringExpression("direccionCentral", this.getDetachedCriteria());
		rol = new IntegerExpression("rol", this.getDetachedCriteria());
		RUT = new IntegerExpression("RUT", this.getDetachedCriteria());
	}
	
	public EmpresaDetachedCriteria createEmpresaidEmpresaCriteria() {
		return new EmpresaDetachedCriteria(createCriteria("empresaidEmpresa"));
	}
	
	public SucursalDetachedCriteria createSucursalCriteria() {
		return new SucursalDetachedCriteria(createCriteria("ORM_Sucursal"));
	}
	
	public Tienda uniqueTienda(PersistentSession session) {
		return (Tienda) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Tienda[] listTienda(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Tienda[]) list.toArray(new Tienda[list.size()]);
	}
}

